package org.tim.common.config;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@Accessors(chain = true)
@ConfigurationProperties(prefix = "tim")
public class TimConfig {
    private static final long DEFAULT_HEARTBEAT_TIMEOUT = 5000;
    private static final int DEFAULT_READ_BUFFER_SIZE = 1024 * 30;
    private static final boolean DEFAULT_USE_QUEUE_SEND = true;
    private static final boolean DEFAULT_USE_QUEUE_DECODE = true;

    private String bind;
    private long heartbeatTimeout = DEFAULT_HEARTBEAT_TIMEOUT;
    private int readBufferSize = DEFAULT_READ_BUFFER_SIZE;
    private boolean useQueueSend = DEFAULT_USE_QUEUE_SEND;
    private boolean useQueueDecode = DEFAULT_USE_QUEUE_DECODE;
}
